package com.example.jay.day45;

import android.content.Intent;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;

import com.zbar.lib.CaptureActivity;


public class TestActivity extends ActionBarActivity {

    private final int REQUEST_CODE=1111;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test);
        startActivityForResult(new Intent(this, CaptureActivity.class),REQUEST_CODE);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (requestCode==REQUEST_CODE){
           String title= data.getExtras().getString("result");

        }
    }
}
